// Button component with custom className and onClick handler without using UI library in TypeScript

import React, { useState } from "react";

const Button = (props: any) => {
  const [isClicked, setIsClicked] = useState(false);
  const { className, onClick, children } = props;

  return (
    <button
      className={`${className} ${isClicked ? "is-clicked" : ""}`}
      onClick={() => setIsClicked(!isClicked)}
    >
      {children}
    </button>
  );
};

export default Button;
